<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>MarkDown语法 | HappyHouse</title><meta name="keywords" content="MarkDown"><meta name="author" content="Lucasooo"><meta name="copyright" content="Lucasooo"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="此文章旨在进行MarkDown学习笔记的记录">
<meta property="og:type" content="article">
<meta property="og:title" content="MarkDown语法">
<meta property="og:url" content="https://lucasprox.github.io/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/index.html">
<meta property="og:site_name" content="HappyHouse">
<meta property="og:description" content="此文章旨在进行MarkDown学习笔记的记录">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s1.ax1x.com/2022/09/26/xVEi2F.png">
<meta property="article:published_time" content="2022-09-26T02:15:14.000Z">
<meta property="article:modified_time" content="2022-09-26T08:03:17.261Z">
<meta property="article:author" content="Lucasooo">
<meta property="article:tag" content="-MarkDown -grammar">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s1.ax1x.com/2022/09/26/xVEi2F.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://lucasprox.github.io/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'MarkDown语法',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-09-26 16:03:17'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.2"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://s1.ax1x.com/2022/09/25/xE6lX8.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">3</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://s1.ax1x.com/2022/09/26/xVA8A0.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">HappyHouse</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">MarkDown语法</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-09-26T02:15:14.000Z" title="发表于 2022-09-26 10:15:14">2022-09-26</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-09-26T08:03:17.261Z" title="更新于 2022-09-26 16:03:17">2022-09-26</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/tools/">tools</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="MarkDown语法"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="此文章旨在进行MarkDown学习笔记的记录"><a href="#此文章旨在进行MarkDown学习笔记的记录" class="headerlink" title="此文章旨在进行MarkDown学习笔记的记录"></a><strong>此文章旨在进行MarkDown学习笔记的记录</strong></h1><h2 id="分级标题"><a href="#分级标题" class="headerlink" title="分级标题"></a>分级标题</h2><h3 id="第一种写法"><a href="#第一种写法" class="headerlink" title="第一种写法:"></a>第一种写法:</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">这是一个一级标题</span><br><span class="line">============================</span><br><span class="line">这是一个二级标题</span><br><span class="line">--------------------------------------------------</span><br></pre></td></tr></table></figure>
<h3 id="第二种写法"><a href="#第二种写法" class="headerlink" title="第二种写法:"></a>第二种写法:</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 一级标题</span><br><span class="line">## 二级标题</span><br><span class="line">### 三级标题</span><br><span class="line">#### 四级标题</span><br><span class="line">##### 五级标题</span><br></pre></td></tr></table></figure>

<h2 id="分隔线"><a href="#分隔线" class="headerlink" title="分隔线"></a>分隔线</h2><p>你可以在一行中用三个以上的星号、减号、底线来建立一个分隔线, 行内不能有其他东西。你也可以在星号或是减号中间插入空格。下面每种写法都可以建立分隔线:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">* * *</span><br><span class="line">***</span><br><span class="line">*****</span><br><span class="line">- - -</span><br><span class="line">---------------------------------------</span><br></pre></td></tr></table></figure>

<hr>
<h2 id="超链接"><a href="#超链接" class="headerlink" title="超链接"></a>超链接</h2><p>Markdown 支持两种形式的链接语法: 行内式和参考式两种形式, 行内式一般使用较多。</p>
<h2 id="行内式"><a href="#行内式" class="headerlink" title="行内式"></a>行内式</h2><p><code>[]</code>内写链接文字，<code>()</code>内写链接地址，<code>()</code>中的<code>&quot;&quot;</code>中可以为链接指定title属性，就是当鼠标悬停在上面会出现指定的title文字。例如：<code>[链接文字]（链接地址 &quot;链接标题&quot;）</code></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[MarkDown](https://baidu.com &quot;MarkDown&quot;)</span><br></pre></td></tr></table></figure>

<blockquote>
<p>样例：<a target="_blank" rel="noopener" href="https://baidu.com/" title="MarkDown语法">MarkDown</a></p>
</blockquote>
<p><strong><a href="#%E5%8F%82%E8%80%83%E5%BC%8F">⬆ 参考式</a></strong><br>##参考式</p>
<p>参考式超链接一般用在学术论文上面, 或者另一种情况, 如果某一个链接在文章中多处使用, 那么使用引用的方式创建链接将非常好, 它可以让你对链接进行统一的管理。<br>参考式链接分为两部分, 文中的写法 [链接文字][链接标记]，在文本的任意位置添加 [链接标记]:链接地址 “链接标题”, 链接地址与链接标题前有一个空格。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">先写一个参考链接：[1]：http://www.google.com &quot;Google&quot; (这个在文章中不会显示)</span><br><span class="line">然后在任意位置引用这个参考链接：[Google][1]</span><br></pre></td></tr></table></figure>

<blockquote>
<p>样例：全球最大的搜索引擎网站：<a target="_blank" rel="noopener" href="http://www.baidu.com/" title="Google">Google</a></p>
</blockquote>
<h2 id="自动链接-在ButterFly-Hexo中不需要这个，直接写链接-前后加空格就行"><a href="#自动链接-在ButterFly-Hexo中不需要这个，直接写链接-前后加空格就行" class="headerlink" title="自动链接(在ButterFly/Hexo中不需要这个，直接写链接,前后加空格就行)"></a>自动链接(在ButterFly/Hexo中不需要这个，直接写链接,前后加空格就行)</h2><p>Markdown 支持以比较简短的自动链接形式来处理网址和电子邮件信箱, 只要是用 &lt;&gt; 包起来， Markdown 就会自动把它转成链接。一般网址的链接文字就和链接地址一样, 例如:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&lt;www.baidu.com&gt;</span><br><span class="line">&lt;Oracle@gmail.com&gt;</span><br></pre></td></tr></table></figure>
<blockquote>
<p>样例：百度公司的搜索引擎 <a target="_blank" rel="noopener" href="http://www.baidu.com/">www.baidu.com</a> 是他们的骄傲</p>
</blockquote>
<h2 id="区块引用"><a href="#区块引用" class="headerlink" title="区块引用"></a>区块引用</h2><p>区块引用需要在被引用的文本前加上<code>&gt;</code>符号。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&gt; 这是一个区块引用实例</span><br><span class="line">&gt; MarkDown.</span><br></pre></td></tr></table></figure>
<blockquote>
<p>这是一个区块引用实例</p>
</blockquote>
<h2 id="引用其它要素，即引用内可以使用其他MarkDown语法"><a href="#引用其它要素，即引用内可以使用其他MarkDown语法" class="headerlink" title="引用其它要素，即引用内可以使用其他MarkDown语法"></a>引用其它要素，即引用内可以使用其他MarkDown语法</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&gt; - 长风破浪会有时，直挂云帆济沧海。</span><br><span class="line">&gt;</span><br><span class="line">&gt; - 执子之手，与子偕老。</span><br></pre></td></tr></table></figure>
<blockquote>
<p>样例：</p>
<ul>
<li>长风破浪会有时，直挂云帆济沧海。</li>
<li>执子之手，与子偕老。<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">(这个是用主题代码块)hello world </span><br></pre></td></tr></table></figure>
<code>(这个是用普通代码块)hello world</code></li>
</ul>
</blockquote>
<h2 id="锚点"><a href="#锚点" class="headerlink" title="锚点"></a>锚点</h2><p>网页中, 锚点其实就是页内超链接, 也就是链接本文档内部的某些元素, 实现当前页面中的跳转。比如我这里写下一个锚点, 点击回到目录, 就能跳转到目录。 在目录中点击这一节, 就能跳过来。还有下一节的注脚。这些根本上都是用锚点来实现的。<br>后面的括号里的是锚点的目标点</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">**[⬆ top](#什么是-markdown-)** </span><br></pre></td></tr></table></figure>
<blockquote>
<p>样例:<strong><a href="#top">⬆ top</a></strong></p>
</blockquote>
<h2 id="强调（强调文字样式）"><a href="#强调（强调文字样式）" class="headerlink" title="强调（强调文字样式）"></a>强调（强调文字样式）</h2><p>Markdown 使用星号<code>*</code>和底线<code>_</code>作为标记强调字词的符号。</p>
<blockquote>
<p>样例：<br>前后一个<code>*</code>是斜体，<em>我爱你</em><br>前后两个<code>**</code>是正体加粗，<strong>我爱你</strong><br>前后三个<code>***</code>是斜体加粗，<em><strong>我爱你</strong></em><br>前后两个<code>~~</code>是删除线，<del>青青子衿，悠悠我心</del></p>
</blockquote>
<h2 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h2><h3 id="无序列表"><a href="#无序列表" class="headerlink" title="无序列表"></a>无序列表</h3><p>使用 *，+，- 表示无序列表。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">- 李白</span><br><span class="line">- 杜甫</span><br><span class="line">- 白居易</span><br></pre></td></tr></table></figure>
<blockquote>
<p>样例：</p>
<ul>
<li>李白</li>
<li>杜甫</li>
<li>白居易</li>
</ul>
</blockquote>
<h3 id="有序列表"><a href="#有序列表" class="headerlink" title="有序列表"></a>有序列表</h3><p>有序列表则使用数字接着一个英文句点。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">1.将进酒</span><br><span class="line">2.望岳</span><br><span class="line">3.琵琶行</span><br></pre></td></tr></table></figure>
<h3 id="包含引用的列表"><a href="#包含引用的列表" class="headerlink" title="包含引用的列表"></a>包含引用的列表</h3><p>如果要在列表项目内放进引用，那<code>&gt;</code>就需要缩进:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">- 将进酒</span><br><span class="line">	&gt;钟鼓馔玉不足贵,但愿长醉不愿醒。</span><br><span class="line">	&gt;古来圣贤皆寂寞,惟有饮者留其名。</span><br></pre></td></tr></table></figure>
<ul>
<li>将进酒<blockquote>
<p>钟鼓馔玉不足贵,但愿长醉不愿醒。<br>古来圣贤皆寂寞,惟有饮者留其名。</p>
</blockquote>
</li>
</ul>
<h2 id="插入图片"><a href="#插入图片" class="headerlink" title="插入图片"></a>插入图片</h2><p>图片的创建方式与超链接相似, 而且和超链接一样也有两种写法, 行内式和参考式写法。</p>
<p>语法中图片Alt的意思是如果图片因为某些原因不能显示, 就用定义的图片Alt文字来代替图片。 图片Title则和链接中的Title一样, 表示鼠标悬停与图片上时出现的文字。 Alt 和 Title 都不是必须的, 可以省略, 但建议写上</p>
<h3 id="图片行内式"><a href="#图片行内式" class="headerlink" title="图片行内式"></a>图片行内式</h3><p><code>![图片alt](图片地址 &quot;图片title，鼠标悬停显示内容&quot;)</code>、</p>
<blockquote>
<p>样例：<br><img src="https://img0.baidu.com/it/u=3123983776,2678596163&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500" alt="哆啦A梦" title="哆啦A梦"></p>
</blockquote>
<h3 id="图片参考式-类似于文字参考，统一在文末参考元素中列出"><a href="#图片参考式-类似于文字参考，统一在文末参考元素中列出" class="headerlink" title="图片参考式(类似于文字参考，统一在文末参考元素中列出)"></a>图片参考式(类似于文字参考，统一在文末<code>参考元素</code>中列出)</h3><p>在文档要插入图片的地方写 <code>![图片Alt][标记]</code><br>在文档的末尾的<code>参考元素</code>一栏写上 <code>[标记]:图片地址 &quot;Title&quot;</code></p>
<blockquote>
<p>样例<br><img src="Doramon" alt="哆啦A梦"></p>
</blockquote>
<h2 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h2><ul>
<li>不管是哪种方式, 第一行为表头, 第二行分隔表头和主体部分, 第三行开始每一行为一个表格行。</li>
<li>列于列之间用管道符|隔开。原生方式的表格每一行的两边也要有管道符。</li>
<li>第二行还可以为不同的列指定对齐方向。默认为左对齐, 在-右边加上:就右对齐</li>
</ul>
<h4 id="简单方式："><a href="#简单方式：" class="headerlink" title="简单方式："></a>简单方式：</h4><p>在<code>| |</code>之间写内容，竖线相当于表格每一行的列表 (:-左对齐，-：右对齐，:-:居中)</p>
<blockquote>
<table>
<thead>
<tr>
<th align="center">诗名</th>
<th align="center">作者</th>
<th align="center">朝代</th>
</tr>
</thead>
<tbody><tr>
<td align="center">白头吟</td>
<td align="center">卓文君</td>
<td align="center">两汉</td>
</tr>
<tr>
<td align="center">锦瑟</td>
<td align="center">李商隐</td>
<td align="center">唐代</td>
</tr>
<tr>
<td align="center">登科后</td>
<td align="center">孟郊</td>
<td align="center">唐代</td>
</tr>
</tbody></table>
</blockquote>
<h2 id="代码"><a href="#代码" class="headerlink" title="代码"></a>代码</h2><p>插入程序代码的方式有两种, 一种是利用缩进(Tab), 另一种是利用`符号(一般在ESC键下方)包裹代码。<br>插入单行或单词符号，可以用左右一个包裹，如果是多行代码，用上下三个进行包裹</p>
<p>##缩进式多行代码</p>
<p>缩进 4 个空格或是 1 个制表符。<br>一个代码区块会一直持续到没有缩进的那一行(或是文件结尾)。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">public class HelloWorld&#123;</span><br><span class="line">    public static void main()&#123;</span><br><span class="line">        System.out.println(&quot;Hello World!!!&quot;);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="HTML-原始码"><a href="#HTML-原始码" class="headerlink" title="HTML 原始码"></a>HTML 原始码</h2><p>在代码区块里面, <code>&amp;</code> 、 <code>&lt;</code> 和 <code>&gt;</code> 会自动转成 HTML 实体, 这样的方式让你非常容易使用 Markdown 插入范例用的 HTML 原始码, 只需要复制贴上, 剩下的 Markdown 都会帮你处理。</p>
<blockquote>
<p>样例：</p>
<table>
    <tr>
        <th rowspan="2">值班人员</th>
        <th>星期一</th>
        <th>星期二</th>
        <th>星期三</th>
    </tr>
    <tr>
        <td>李强</td>
        <td>张明</td>
        <td>王平</td>
    </tr>
</table>
</blockquote>
<h2 id="内容目录"><a href="#内容目录" class="headerlink" title="内容目录"></a>内容目录</h2><p>在段落中填写 <code>[TOC]</code> 以显示全文内容的目录结构。</p>
<h2 id="注脚"><a href="#注脚" class="headerlink" title="注脚"></a>注脚</h2><p>在需要添加注脚的文字后加上脚注名字<code>[^注脚名字]</code>, 称为加注。 然后在文本的任意位置(一般在最后)添加脚注, 脚注前必须有对应的脚注名字。</p>
<blockquote>
<p>使用 Markdown[^1]可以效率的书写文档, 直接转换成 HTML[^2]。<br>[^1]: Markdown 是一种纯文本标记语言<br>[^2]: HyperText Markup Language 超文本标记语言</p>
</blockquote>
<h2 id="LaTeX-公式"><a href="#LaTeX-公式" class="headerlink" title="LaTeX 公式"></a>LaTeX 公式</h2><h3 id="表示行内公式"><a href="#表示行内公式" class="headerlink" title="$表示行内公式"></a>$表示行内公式</h3><blockquote>
<p>质能守恒方程可以用一个很简洁的方程式 $E=mc^2$ 来表达。</p>
</blockquote>
<p>质能守恒方程可以用一个很简洁的方程式 &amp;E=mc^2&amp; 来表达</p>
<h3 id="表示整行公式"><a href="#表示整行公式" class="headerlink" title="$$表示整行公式"></a>$$表示整行公式</h3><blockquote>
<p>$$\sum_{i=1}^n a_i=0$$<br>$$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$<br>$$\sum^{j-1}<em>{k=0}{\widehat{\gamma}</em>{kj} z_k}$$</p>
</blockquote>
<p>PS:github 不支持 LaTeX 公式, 但是有个折中的解决方案, 使用 codecogs, 例如</p>
<blockquote>
<p>![](<a target="_blank" rel="noopener" href="https://latex.codecogs.com/gif.latex?sum_%7Bi=1%7D%5En">https://latex.codecogs.com/gif.latex?sum_{i=1}^n</a> a_i=0)<br><img src="https://latex.codecogs.com/gif.latex?f(x_1,x_x,%5Cldots,x_n%5C"> = x_1^2 + x_2^2 + \cdots + x_n^2 )</p>
</blockquote>
<p><img src="https://latex.codecogs.com/gif.latex?f(x_1,x_x,%5Cldots,x_n%5C"> = x_1^2 + x_2^2 + \cdots + x_n^2 )</p>
<h2 id="流程图-Github不支持"><a href="#流程图-Github不支持" class="headerlink" title="流程图(Github不支持)"></a>流程图(Github不支持)</h2><p>流程图大致分为两段, 第一段是定义元素, 第二段是定义元素之间的走向。</p>
<p>定义元素的语法 tag=&gt;type: content:&gt;url。</p>
<p>tag就是元素名字。<br>type是这个元素的类型, 有6中类型,分别为:<br>type|含义 -|- start|开始 end|结束 operation|操作 subroutine|子程序 condition|条件 inputoutput|输入或产出</p>
<p>content 就是在框框中要写的内容, 注意type后的冒号与文本之间一定要有个空格。</p>
<p>用-&gt;来连接两个元素, 需要注意的是condition类型, 因为他有yes和no两个分支, 所以要写成:</p>
<blockquote>
<p>c2(yes)-&gt;io-&gt;e<br>c2(no)-&gt;op2-&gt;e</p>
</blockquote>
<blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">st=&gt;start: Start:&gt;https://www.markdown-syntax.com</span><br><span class="line">io=&gt;inputoutput: verification</span><br><span class="line">op=&gt;operation: Your Operation</span><br><span class="line">cond=&gt;condition: Yes or No?</span><br><span class="line">sub=&gt;subroutine: Your Subroutine</span><br><span class="line">e=&gt;end</span><br><span class="line">st-&gt;io-&gt;op-&gt;cond</span><br><span class="line">cond(yes)-&gt;e</span><br><span class="line">cond(no)-&gt;sub-&gt;io</span><br></pre></td></tr></table></figure>
</blockquote>
<p>PS:Github不支持流程图</p>
<h2 id="时序图"><a href="#时序图" class="headerlink" title="时序图"></a>时序图</h2><blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&gt;Alice-&gt;Bob: Hello Bob, how are you ?</span><br><span class="line">&gt;Note right of Bob: Bob thinks</span><br><span class="line">&gt;Bob--&gt;Alice: I am good thanks!</span><br></pre></td></tr></table></figure>
</blockquote>
<p>PS:Github不支持时序图</p>
<h2 id="待办事宜"><a href="#待办事宜" class="headerlink" title="待办事宜"></a>待办事宜</h2><p>使用带有<code>[ ]</code>或<code>[x]</code>(未完成或已完成)项的列表语法撰写一个待办事宜列表, 例如:</p>
<blockquote>
<p>*[ ]早上看书<br>*[X]晚上跑步</p>
</blockquote>
<p>*[ ]早上看书<br>*[X]晚上跑步</p>
<h2 id="参考元素"><a href="#参考元素" class="headerlink" title="参考元素"></a>参考元素</h2></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://LucasProX.github.io">Lucasooo</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://lucasprox.github.io/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/">https://lucasprox.github.io/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://LucasProX.github.io" target="_blank">HappyHouse</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/MarkDown-grammar/">-MarkDown -grammar</a></div><div class="post_share"><div class="social-share" data-image="https://s1.ax1x.com/2022/09/26/xVEi2F.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2022/09/26/MovieTest/"><img class="prev-cover" src="" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">MusicTest</div></div></a></div><div class="next-post pull-right"><a href="/2022/09/24/hello-world/"><img class="next-cover" src="" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Hello Guys~</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://s1.ax1x.com/2022/09/25/xE6lX8.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Lucasooo</div><div class="author-info__description">一个喜欢思考的人</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">3</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/LucasProX"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/LucasProX" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="https://tian12049@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://s1.ax1x.com/2022/09/26/xV0saR.png" target="_blank" title="Wechat"><i class="fa-brands fa-weixin"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">永远爱可爱琦琦</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%AD%A4%E6%96%87%E7%AB%A0%E6%97%A8%E5%9C%A8%E8%BF%9B%E8%A1%8CMarkDown%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%E7%9A%84%E8%AE%B0%E5%BD%95"><span class="toc-number">1.</span> <span class="toc-text">此文章旨在进行MarkDown学习笔记的记录</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%86%E7%BA%A7%E6%A0%87%E9%A2%98"><span class="toc-number">1.1.</span> <span class="toc-text">分级标题</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E4%B8%80%E7%A7%8D%E5%86%99%E6%B3%95"><span class="toc-number">1.1.1.</span> <span class="toc-text">第一种写法:</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E4%BA%8C%E7%A7%8D%E5%86%99%E6%B3%95"><span class="toc-number">1.1.2.</span> <span class="toc-text">第二种写法:</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%86%E9%9A%94%E7%BA%BF"><span class="toc-number">1.2.</span> <span class="toc-text">分隔线</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%B6%85%E9%93%BE%E6%8E%A5"><span class="toc-number">1.3.</span> <span class="toc-text">超链接</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A1%8C%E5%86%85%E5%BC%8F"><span class="toc-number">1.4.</span> <span class="toc-text">行内式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%87%AA%E5%8A%A8%E9%93%BE%E6%8E%A5-%E5%9C%A8ButterFly-Hexo%E4%B8%AD%E4%B8%8D%E9%9C%80%E8%A6%81%E8%BF%99%E4%B8%AA%EF%BC%8C%E7%9B%B4%E6%8E%A5%E5%86%99%E9%93%BE%E6%8E%A5-%E5%89%8D%E5%90%8E%E5%8A%A0%E7%A9%BA%E6%A0%BC%E5%B0%B1%E8%A1%8C"><span class="toc-number">1.5.</span> <span class="toc-text">自动链接(在ButterFly&#x2F;Hexo中不需要这个，直接写链接,前后加空格就行)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8C%BA%E5%9D%97%E5%BC%95%E7%94%A8"><span class="toc-number">1.6.</span> <span class="toc-text">区块引用</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%BC%95%E7%94%A8%E5%85%B6%E5%AE%83%E8%A6%81%E7%B4%A0%EF%BC%8C%E5%8D%B3%E5%BC%95%E7%94%A8%E5%86%85%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E5%85%B6%E4%BB%96MarkDown%E8%AF%AD%E6%B3%95"><span class="toc-number">1.7.</span> <span class="toc-text">引用其它要素，即引用内可以使用其他MarkDown语法</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%94%9A%E7%82%B9"><span class="toc-number">1.8.</span> <span class="toc-text">锚点</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%BC%BA%E8%B0%83%EF%BC%88%E5%BC%BA%E8%B0%83%E6%96%87%E5%AD%97%E6%A0%B7%E5%BC%8F%EF%BC%89"><span class="toc-number">1.9.</span> <span class="toc-text">强调（强调文字样式）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%97%E8%A1%A8"><span class="toc-number">1.10.</span> <span class="toc-text">列表</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%97%A0%E5%BA%8F%E5%88%97%E8%A1%A8"><span class="toc-number">1.10.1.</span> <span class="toc-text">无序列表</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9C%89%E5%BA%8F%E5%88%97%E8%A1%A8"><span class="toc-number">1.10.2.</span> <span class="toc-text">有序列表</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8C%85%E5%90%AB%E5%BC%95%E7%94%A8%E7%9A%84%E5%88%97%E8%A1%A8"><span class="toc-number">1.10.3.</span> <span class="toc-text">包含引用的列表</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87"><span class="toc-number">1.11.</span> <span class="toc-text">插入图片</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9B%BE%E7%89%87%E8%A1%8C%E5%86%85%E5%BC%8F"><span class="toc-number">1.11.1.</span> <span class="toc-text">图片行内式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9B%BE%E7%89%87%E5%8F%82%E8%80%83%E5%BC%8F-%E7%B1%BB%E4%BC%BC%E4%BA%8E%E6%96%87%E5%AD%97%E5%8F%82%E8%80%83%EF%BC%8C%E7%BB%9F%E4%B8%80%E5%9C%A8%E6%96%87%E6%9C%AB%E5%8F%82%E8%80%83%E5%85%83%E7%B4%A0%E4%B8%AD%E5%88%97%E5%87%BA"><span class="toc-number">1.11.2.</span> <span class="toc-text">图片参考式(类似于文字参考，统一在文末参考元素中列出)</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A1%A8%E6%A0%BC"><span class="toc-number">1.12.</span> <span class="toc-text">表格</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E7%AE%80%E5%8D%95%E6%96%B9%E5%BC%8F%EF%BC%9A"><span class="toc-number">1.12.0.1.</span> <span class="toc-text">简单方式：</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BB%A3%E7%A0%81"><span class="toc-number">1.13.</span> <span class="toc-text">代码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#HTML-%E5%8E%9F%E5%A7%8B%E7%A0%81"><span class="toc-number">1.14.</span> <span class="toc-text">HTML 原始码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%86%85%E5%AE%B9%E7%9B%AE%E5%BD%95"><span class="toc-number">1.15.</span> <span class="toc-text">内容目录</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E8%84%9A"><span class="toc-number">1.16.</span> <span class="toc-text">注脚</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#LaTeX-%E5%85%AC%E5%BC%8F"><span class="toc-number">1.17.</span> <span class="toc-text">LaTeX 公式</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%A1%A8%E7%A4%BA%E8%A1%8C%E5%86%85%E5%85%AC%E5%BC%8F"><span class="toc-number">1.17.1.</span> <span class="toc-text">$表示行内公式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%A1%A8%E7%A4%BA%E6%95%B4%E8%A1%8C%E5%85%AC%E5%BC%8F"><span class="toc-number">1.17.2.</span> <span class="toc-text">$$表示整行公式</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B5%81%E7%A8%8B%E5%9B%BE-Github%E4%B8%8D%E6%94%AF%E6%8C%81"><span class="toc-number">1.18.</span> <span class="toc-text">流程图(Github不支持)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%97%B6%E5%BA%8F%E5%9B%BE"><span class="toc-number">1.19.</span> <span class="toc-text">时序图</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%BE%85%E5%8A%9E%E4%BA%8B%E5%AE%9C"><span class="toc-number">1.20.</span> <span class="toc-text">待办事宜</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E5%85%83%E7%B4%A0"><span class="toc-number">1.21.</span> <span class="toc-text">参考元素</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/09/26/MovieTest/" title="MusicTest"><img src="" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MusicTest"/></a><div class="content"><a class="title" href="/2022/09/26/MovieTest/" title="MusicTest">MusicTest</a><time datetime="2022-09-26T09:55:00.000Z" title="发表于 2022-09-26 17:55:00">2022-09-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/" title="MarkDown语法"><img src="https://s1.ax1x.com/2022/09/26/xVEi2F.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MarkDown语法"/></a><div class="content"><a class="title" href="/2022/09/26/MarkDown%E8%AF%AD%E6%B3%95/" title="MarkDown语法">MarkDown语法</a><time datetime="2022-09-26T02:15:14.000Z" title="发表于 2022-09-26 10:15:14">2022-09-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/09/24/hello-world/" title="Hello Guys~"><img src="" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hello Guys~"/></a><div class="content"><a class="title" href="/2022/09/24/hello-world/" title="Hello Guys~">Hello Guys~</a><time datetime="2022-09-24T09:06:03.496Z" title="发表于 2022-09-24 17:06:03">2022-09-24</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By Lucasooo</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">技术是需要积累的</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><div class="js-pjax"></div><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>